<%-- 
    Name:     Nguyen Minh Trung
    Class:    SE0691
    Document   : editSavingJSP
    Created on : Nov 22, 2012, 2:33:54 PM
  
--%>
<%@taglib prefix="pf"
          uri="/WEB-INF/tlds/pf_tag_lib.tld"%>
<%@page import="com.sun.xml.internal.bind.v2.model.core.ID"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Edit Saving</title>
        <link rel="stylesheet" type="text/css" href="../Theme/style.css">
        <script src="../Theme/jquery-1.7.2.js" type="text/javascript">
        </script>
        <script src="../Theme/Script.js" type="text/javascript">
        </script>
    </head>
    <body>
        <%int id = Integer.parseInt(request.getParameter("id"));%>  
            <pf:logo_tag/>;

        <table border="0" style="margin-left: 50px; margin-top: 150px" >
            <tr>
                <td style="height: 500px; width: 180px;"><%@include file="/leftpannel.jsp" %></td>
                <td style="height: 500px; width: 750px; border: 2px; border-style: solid; border-color: #000;">
                    <div class="add_saving" style="border: 2px; border-style: solid; border-color: #000;">
                        <form action="../editSavingServlet?id=<%=id%>" method="POST">
                            <table style="width: 740px; border: 2px; border-style: solid; border-color: #000;">
                                <tr class="entry" style="background-color: #31a1e7;">
                                    <td class="lab">Name</td>
                                    <td><input type="text" name="name"></td>
                                    <td class="lab">Amount</td>
                                    <td><input class="amount_add_saving" type="text" name="amount"></td>
                                    <td class="lab">Type</td>
                                    <td>
                                        <select name="type">
                                            <option value="unexpected">Unexpected</option>
                                            <option value="personal">Personal</option>
                                            <option value="family">Family</option>
                                            <option value="social">Social</option>
                                        </select>
                                    </td>
                                    <td class="lab">Month</td>
                                    <td>                  
                                        <select name="month">
                                            <option value="1">1</option>
                                            <option value="2">2</option>
                                            <option value="3">3</option>
                                            <option value="4">4</option>
                                            <option value="5">5</option>
                                            <option value="6">6</option>
                                            <option value="7">7</option>
                                            <option value="8">8</option>
                                            <option value="9">9</option>
                                            <option value="10">10</option>
                                            <option value="11">11</option>
                                            <option value="12">12</option>
                                        </select>
                                    </td>
                                    <td class="lab">Year: </td>
                                    <td><select name="year">
                                            <% int yea = Calendar.getInstance().get(Calendar.YEAR);
                                                yea -= 50;
                                                for (int j = 0; j < 100; j++) {
                                                    if ((yea + j) == Calendar.getInstance().get(Calendar.YEAR)) {
                                                        out.print("<option selected='selected'>" + (yea + j) + "</option>");
                                                    } else {
                                                        out.print("<option>" + (yea + j) + "</option>");
                                                    }

                                                }
                                            %>
                                        </select>
                                    </td>
                                    <td><input type="submit" class="butt_search" value="Edit" name="addSaving" />
                                </tr>
                            </table>  
                        </form>
                    </div>
                </td>
                <td style="height: 500px; width: 150px;"><%@include file="/rightpannel.jsp" %></td>
            </tr>
        </table>



    </body>
</html>
